<extend name="Base/common" xmlns="http://www.w3.org/1999/html"/>
<block name="header">
    <include file="Public/nav"/>
</block>
<block name="body">
    <script src="__JS__/appstore.js"></script>
    <script src="__JS__/etalage.js"></script>
    <link href="__JS__/etalage.css" rel="stylesheet" type="text/css">
    <script src="__JS__/price.js"></script>
    <!--模板详情-->
    <div class="container">
        <div class="clearfix">

            <div class="clearfix">
                <div class="col-xs-9">
                    <div class="common-block ">
                        <script>
                            $(function () {
                                $('#etalage').etalage({
                                    thumb_image_width: 250,
                                    thumb_image_height: 250,
                                    source_image_width: 800,
                                    source_image_height: 800,
                                    show_hint: true,

                                    click_callback: function (image_anchor, instance_id) {
                                        alert('回调函数:\nYou clicked on an image with the anchor: "' + image_anchor + '"\n(in Etalage instance: "' + instance_id + '")');
                                    }
                                });

                            })
                        </script>
                        <div class="col-xs-4">
                            <div class="margin-top-10 ">
                                <ul id="etalage" style="margin-bottom: 20px">
                                    <volist name="data.cover" id="vo">
                                        <li>
                                            <img class="etalage_thumb_image" src="{$vo|thumb=250,250}"/>
                                            <img class="etalage_source_image" src="{$vo|thumb=500,500}"/>
                                        </li>
                                    </volist>
                                </ul>
                            </div>
                        </div>
                        <div class="col-xs-8 ">
                            <div style="padding-left: 20px">
                                <header>
                                    <h1 class="">{$data.title|text}
                                        <div class="pull-right">
                                            {:W('Appstore/Watch/render',array($data))}&nbsp;&nbsp;
                                            {:W('Weibo/Share/shareBtn',array('param'=>array('title'=>$data['title'],'content'=>$data['ad'],'img'=>getThumbImageById($data['cover'][0],160,160),'from'=>$MODULE_ALIAS,'site_link'=>U('appstore/index/moduledetail',array('id'=>$data['id']))),'text'=>'<span
                                                class="share-btn"><i class="icon-share"></i> </span>'))}
                                        </div>
                                    </h1>
                                </header>
                                <div class="iteminfo-wrapper" style="position: relative">
                                    <div class="other-info">
                                        <div class="col-xs-6" style="border-right: 1px solid #ddd">下载<br/>{$data.total_download_count}
                                        </div>
                                        <div class="col-xs-6">销量<br/> {$data.sales}
                                        </div>
                                    </div>
                                    {:W('Price/render',array($data))}
                                    <form action="{:U('Appstore/Index/buy',array('id'=>$versions[0]['id']))}" method="post">
                                        <input type="hidden" value="0" name="price_id">
                                        <input type="hidden" value="{$versions[0]['id']}" name="version_id">
                                        <div class="clearfix" style="margin-top: 20px;margin-bottom: 40px">
                                            <input id="button-buy" disabled="disabled"  type="submit" class="button-buy" value="立即购买"/>
                                            <neq name="data.demo" value="">

                                                <a class="button-demo" href="{$data.demo}" target="_blank">查看演示</a>

                                            </neq>
                                            <neq name="data.developer.kf_qq" value="">
                                                <a href="tencent://message/?uin={$data.developer.kf_qq}&Menu=yes"
                                                   class="button-consult"><i
                                                        class="icon-qq"></i> 联系客服</a>
                                            </neq>
                                        </div>
                                    </form>

                                </div>
                                <div>
                                    <dl class="dl-inline text-muted">
                                        上架时间：{$data.update_time|date='Y-m-d',###}
                                        <if condition="check_auth('Appstore/Admin/manage') OR $data['uid'] eq is_login()">
                                            <div class="pull-right"><a
                                                    href="{:U('admin/addtheme',array('id'=>$data['id']))}">编辑</a></div>
                                        </if>
                                    </dl>


                                </div>

                            </div>

                        </div>

                        <include file="_detail_comment"/>


                    </div>
                </div>


                <div class="col-xs-3 ">
                    <div class="common-block">
                        <include file="Index/_side"/>
                    </div>
                </div>
            </div>


        </div>
    </div>


</block>